#include "MoveListener.h"
#include "MoveEvent.h"
#include "GameApp.h"

MoveListener::MoveListener(void)
{

}


MoveListener::~MoveListener(void)
{

}

bool MoveListener::handleEvent(IGameEvent const &event)
{
	const MoveEvent &evt = static_cast<const MoveEvent&>(event);

	MoveableObjectPtr obj = evt.mpObject;

	if (evt.mDirection == Direction_Left)
	{
		obj->moveLeft();
	}
	else
	{
		obj->moveRight();
	}
	return true;
}